// 导入vue实例
import Vue from "vue";
//导入 App 组件
import App from "./App";
//导入 vue router
import router from "./routers/routers";
//导入 dataV
import dataV from "@jiaminghi/data-view";
//导入 ElementUI
import ElementUI from "element-ui";

//导入全局初始化样式
import "./assets/css/chuShiHua.css"

import store from "./store";
import "element-ui/lib/theme-chalk/index.css";
//导入第三方依赖包
import axios from "axios";
import VueAxios from "vue-axios";

//#region JR-引入字体与字体图标--START
import "@/assets/fonts/font/style.css";
import "@/assets/fonts/icon/iconfont.css";
//#endregion

// import echarts from 'echarts';
import * as echarts from "echarts";
import "echarts-gl";
//全局引入封装的echarts
import eChartFn from "./components/chart/index.js";
import ChartPanel from "./components/chart/index.vue";
Vue.component(ChartPanel.name, ChartPanel);
Vue.prototype.$eChartFn = eChartFn;

//echarts 3d扩展，提供3D绘图，地球可视化和WebGL加速
// import 'echarts-liquidfill/src/liquidFill.js';//水位图
Vue.prototype.$echarts = echarts;

Vue.use(ElementUI);

Vue.use(VueAxios, axios);
// 配置请求基础路径(api的url)
// axios.defaults.baseURL = 'http://api.com/'
Vue.prototype.$unityinit = {};

// Vue.use(BaiduMap, {
//   // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
//   ak: 'webgl&ak=f8N1CkhkeYZM4t1UsoC2QvMMfTnDcGGY'
// })

//使用dataV
Vue.use(dataV);
//实例化Vue实例
let vue = new Vue({
  //定义Vue绑定的跟元素
  el: "#app",
  store,
  render: h => h(App),
  //用<App/>代替根元素
  template: "<App/>",
  //声明App组件，这样上面的<App/>元素就可以生效
  components: { App },
  //将上面声明的路由器传递到根Vue实例
  router
}).$mount("#app"); //将这个实例挂载到id=app的根元素上
export default vue;
